package com.cloud.api.domain.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serializable;
@Data
@Schema(description = "修改用户请求参数")
public class UpdateUserRequest implements Serializable {

    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    @NotEmpty(message = "{validation.user.userId}")
    private String userId;

    @Schema(description = "姓名")
    @NotEmpty(message = "{validation.user.name}")
    @Size(max = 8,message = "{validation.user.name.length}")
    private String name;

    @Schema(description = "角色")
    @NotEmpty(message = "{validation.user.roleCode}")
    private String roleCode;

    @Schema(description = "组织机构")
    @NotEmpty(message = "{validation.user.deptId}")
    private String deptId;

    @Schema(description = "邮箱")
    @Email(message = "{validation.user.email}")
    private String email;

    @Schema(description = "手机号")
    @NotEmpty(message = "{validation.common.phone}")
    @Pattern(regexp = "^1(3|4|5|6|7|8|9)\\d{9}$",message = "{validation.common.phoneFormat}")
    private String mobile;

    /*@Schema(description = "数据权限")
    @NotEmpty(message = "{validation.user.deptCode}")
    private String deptCode;*/
}
